package com.example.hasee.plant.config;

import android.app.Application;
import android.util.Log;

import java.util.Calendar;

import static android.content.ContentValues.TAG;

/**
 * Created by hasee on 2017-01-31.
 */

public class MyApplication extends Application {
    public static final String IMG_PATH="/img";
    public static final String AUDIO_PATH="/audio";
    public static final String VIDEO_PATH="/video";

    public static String IMG_PATH_FINISH=null;
    public static String AUDIO_PATH_FINISH=null;
    public static String VIDEO_PATH_FINISH=null;
    public static String GATHER_NUM=null;

    /**
     * 获取系统时间
     *
     * @return
     */
    public static String getDate() {
        Calendar ca = Calendar.getInstance();
        int year = ca.get(Calendar.YEAR);           // 获取年份
        int month = ca.get(Calendar.MONTH);         // 获取月份
        int day = ca.get(Calendar.DATE);            // 获取日
        int minute = ca.get(Calendar.MINUTE);       // 分
        int hour = ca.get(Calendar.HOUR);           // 小时
        int second = ca.get(Calendar.SECOND);       // 秒

        String date = "" + year + (month + 1) + day + hour + minute + second;
        Log.d(TAG, "date:" + date);

        return date;
    }

}
